package com.xgq.drink.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xgq.drink.entity.User;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT * FROM user WHERE username = #{usernameOrPhone} OR phone = #{usernameOrPhone}")
    User getUserByUsernameOrPhone(@Param("usernameOrPhone") String usernameOrPhone);
}